write a program to check whether the given number is a prime or not